home *** CD-ROM | disk | FTP | other *** search
-
- The IBM Personal Computer file print command, PRT, is used to print a PC-DOS
- file on a device attached to the serial port. It is most useful for printing
- a file when other than a straight line-by-line listing, such as that obtained
- by using ctl-PrtSc in conjunction with the TYPE command, is desired or when
- special printer features are to be used.
-
- The format of the PRT command is:
-
- +-------+---------------------------------------------------------------------+
- | | |
- | PRT | [filespec [/][option] [/][...][;] |
- | | |
- | | options: |
- | | INIT RESET ENLarged CONDensed ENHanced EMPHasized |
- | | NOINIT NORESET NOENLarged NOCONDensed NOENHanced NOEMPHasized |
- | | |
- | | HEX Header CC LPI 6 PAGESIze n FROM n FOR n |
- | | NOHEX UHeader NOCC 8 |
- | | NOHeader |
- | | |
- +-------+---------------------------------------------------------------------+
-
- where:
-
- filespec specifies the PC-DOS file name and file extension ("filetype") of
- the disk file to be printed. "filespec" may optionally be pre-
- fixed with a drive specification (e.g., "B:") to override the
- current default drive. If "filespec" is specified as "?", a
- brief summary of the PRT command options are displayed on the
- monitor.
-
- If "filespec" is omitted, you will be prompted ("IN_FILE: ") to
- enter it from the terminal.
-
- If no options are specified following "filespec", you will be
- prompted ("OPTIONS: ") to enter them from the terminal. If you
- are satisfied with the default values for all the options, and
- don't want to enter a null line in response to the "OPTIONS: "
- prompt, you can specify the character ";" following "filespec"
- to suppress the prompt and cause the defaults to be used.
-
- options:
-
- INIT specifies that various codes, as specified by the [NO]ENLARGED,
- [NO]CONDENSED, [NO]ENHANCED, [NO]EMPHASIZED, and LPI n options
- (or their associated defaults), are to be sent to the printer
- prior to printing the file. This is the default.
-
- NOINIT specifies that NO printer codes are to be sent prior to printing
- the file--in other words, the printer attributes in effect prior
- to issuing the PRT command are used for printing the file. Spec-
- ifying the NOINIT option causes the specification of any of the
- following options (or their negations) to be ignored: ENLARGED,
- CONDENSED, ENHANCED, EMPHASIZED, and LPI.
-
- RESET specify whether (RESET) or not (NORESET) the default printer
- NORESET attributes are to be restored after the file has been printed.
- RESET is the default. If RESET is specified or allowed to
- default, the printer attributes are reset to: NOENLARGED,
- NOCONDENSED, NOEMPHASIZED, NOENHANCED, LPI 8, and no "skip over
- perferations".
-
- ENLARGED specify whether (ENLARGED) or not (NOENLARGED) the file is to be
- NOENLARGED printed using the "enlarged" character set generated by the
- printer. NOENLARGED is the default. Note that ENLARGED can be
- combined with CONDENSED to produce "enlarged condensed"
- characters which are different in size from normal, enlarged,
- and condensed characters.
-
- CONDENSED specify whether (CONDENSED) or not (NOCONDENSED) the file is to
- NOCONDENSED be printed using the "condensed" character set generated by the
- printer. NOCONDENSED is the default. Note that CONDENSED can
- be combined with ENLARGED to produce "enlarged condensed"
- characters which are different in size from normal, enlarged,
- and condensed characters.
-
- ENHANCED specify whether (ENHANCED) or not (NOENHANCED) the characters
- NOENHANCED are to be double printed (by printing the character, advancing
- the paper by 1/216 inch, and then printing the same character
- again). NOENHANCED is the default.
-
- EMPHASIZED specify whether (EMPHASIZED) or not (NOEMPHASIZED) the characters
- NOEMPHASIZED are to be given a strong impression on the printer. NOEMPHASIZED
- is the default.
-
- HEX specify whether (HEX) or not (NOHEX) lines are to be printed
- NOHEX along with the hexadecimal representation of each byte. If HEX
- is specified, each line from the input file is preceded by a
- line on the printer containing the input file line number and
- length. The the line itself is printed (with all characters
- between X'00' and X'1F', and X'FF' changed to a blank). This
- line is followed by a line containing the high-order hex digit
- of the byte directly above it. Then another line is printed
- showing the low-order hex digit in a similar fashion. NOHEX is
- the default.
-
- HEADER specifies that before the first line from the file is printed,
- and after every PAGESIZE - (LPI/2) lines after that, a formfeed
- is to be sent to the printer to position it at the top of form.
- A "page header" is then printed which gives the input filespec,
- the date it was last updated, the date and time the PRT command
- was issued, and the page number. This header is followed by
- LPI/2 - 1 blank lines (2 if LPI 6, 3 if LPI 8) prior to printing
- the first/next line from the input file. HEADER is the default
- unless CC (see below) is in effect.
-
- UHEADER works in a similar fashion to HEADER, except you are prompted
- to enter a heading from the terminal to be used in place of the
- one generated by the PRT command. If the first character of
- the header is ",", then it can be followed by up to 50 characters
- that are used to replace "date last updated" and "current date and
- time" fields mentioned above. If the entered header does not
- begin with a comma, it can contain up to 70 characters which
- replace all fields in the page heading except the page number.
-
- NOHEADER causes LPI/2 blank lines to be printed at the top of each page
- (i.e., a 1/2 inch blank margin is left at the top of the page).
-
- CC specifies that the carriage control characters imbeded within
- the file (i.e., formfeeds and linefeeds) are to be used to
- format the listing rather than the PRT command keeping track
- of lines and performing page ejects and printing page headings.
- If CC is in effect, any HEADER/UHEADER/NOHEADER specification
- is ignored. CC is the default if "filespec" contains a file
- extension ("filetype") of "LST". Any other extension causes
- NOCC to be the default.
-
- NOCC causes PRT to keep track of the lines read from the input file
- and to skip over page perforations as described for the "xHEADER"
- options above. Linefeeds encountered in the input file are
- honored and used to increment the line count. Formfeeds are
- treated as linefeeds. NOCC is the default unless "filespec"
- contains a file extension ("filetype") of "LST".
-
- LPI 6 specify the number of lines to be printed per vertical inch of
- 8 paper. The only valid values are "6" and "8", with "6" being
- the default.
-
- PAGESIZE n specifies the maximum number of lines that are to be printed on
- a page prior to automatically sending a formfeed character to
- the printer and printing the appropriate page heading. The
- actual number of lines from the input file that are printed on
- a page is PAGESIZE - (LPI/2) less the number of linefeed and
- formfeed characters encountered. PAGESIZE 63 is the default
- (unless CC is in effect, in which case PAGESIZE is ignored).
- "n" must be 5 or larger.
-
- FROM n specifies the line number of the input file from which printing
- is to commense. This can be used to print the first n-1 lines
- (ignoring linefeeds and formfeeds) in the file. "FROM 1" is
- the default.
-
- FOR n specifies the maximum number of lines (ignoring linefeeds and
- formfeeds) that are to be read from the file. This can be used,
- often in conjunction with the FROM option, to only print a
- selected number of lines from the file. "FOR 32767" is the
- default.
-
- notes:
-
- Options can be prefixed with a "/" character to be compatible with the
- options on some other PC-DOS commands, although the "/" specification is not
- required. If and when a ";" is encounted in the option specification,
- it and any characters that follow are ignored. While this technique can
- be used to place comments on the end of the command line, its primary use
- is to suppress the prompt for the entry of options when the default option
- values are satisfactory.
-
- The PRT command is written in IBM PASCAL. The source code is available
- and the "VALUE" section can be examined to modify the printer codes (see
- the "INIT_xxxx_ON" and "INIT_xxxx_OFF" variables) if they differ slightly
- for your printer.
-
- The PRT command has been tested only with the Epson MX-100 printer. It
- should also work with the MX-80 printer since they are very similar (and
- the PRT command doesn't use any of the MX-100's graphics features),
- although this has never been verified (due to the lack of an MX-80
- printer to play with!).
-
-